﻿using System;
using System.ServiceModel;
using System.Collections.Generic;
using Sinacor.Infra.Common.Exceptions;
using Sinacor.Infra.Service.ExceptionHandling;
using Sinacor.Infra.Service.Security.Services;
using Sinacor.Infra.Common;
using Sinacor.Infra.Common.Exceptions.FaultContracts;

namespace Sinacor.Servico.Bovespa.Corretagem.Service.ServiceContract
{
    /// <summary>
    /// Contrato de serviço para controle de beneficio de politica de corretagem
    /// </summary>
    [ExceptionShielding]
    [ServiceContract(Namespace = "http://www.bovespa.com.br/Sinacor.Servico.Bovespa.Corretagem.Service.ServiceContract", SessionMode = SessionMode.Allowed, Name = "IControleBeneficio")]
    public interface IControleBeneficio
    {
        #region Métodos

        /// <summary>
        /// Consulta lista de controles de beneficios de politicas de corretagem conforme
        /// filtro.
        /// </summary>
        /// <param name="request"></param>
        [OperationLog]
        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "ConsultarControlesBeneficios")]
        List<DataContract.Response.ControleBeneficioResponse> ConsultarControlesBeneficios(DataContract.Request.FiltroControleBeneficioRequest request);

        /// <summary>
        /// Exclui um controle de benefício de politica de corretagem.
        /// </summary>
        /// <param name="request"></param>
        [OperationLog]
        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "ExcluirControleBeneficio")]
        void ExcluirControleBeneficio(DataContract.Request.FiltroControleBeneficioChaveRequest request);

        /// <summary>
        /// Inclui um controle de benefício de politica de corretagem
        /// </summary>
        /// <param name="request"></param>
        [OperationLog]
        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, AsyncPattern = false, Action = "IncluirControleBeneficio")]
        void IncluirControleBeneficio(DataContract.Request.ControleBeneficioRequest request);

        #endregion
    }
}